/**
 * There are code generation
 */
package com.neusoft.lohas.modules.ivm.dao.product;

import org.springframework.stereotype.Repository;

import com.neusoft.lohas.common.persistence.BaseDao;
import com.neusoft.lohas.common.persistence.Parameter;
import com.neusoft.lohas.modules.ivm.entity.product.ProductUnit;

/**
 * 商品单位DAO接口
 * @author Jackie.Liu
 * @version 2014-10-30
 */
@Repository
public class ProductUnitDao extends BaseDao<ProductUnit> {

	public ProductUnit findByName(String type, String name, String mId) {
		return getByHql("from ProductUnit where type = :p1 and name = :p2 and merchant.id = :p3 and delFlag = :p4", new Parameter(type, name, mId, ProductUnit.DEL_FLAG_NORMAL));
	}
	
}
